package service;

import com.dao.StudentDao;
import pojo.Student;
import utils.MyUtil;

import java.util.*;

public class StudentServiceImpl implements StudentService {

    private StudentDao dao= MyUtil.getMybatisSqlSession().getMapper(StudentDao.class);

    @Override
    public Student selectStudentById(Long id) {
        return dao.selectStudentById(id);
    }

    @Override
    public List<Student> selectStudentByBirth(Date date) {
        return dao.selectStudentByBirth(date);
    }

    @Override
    public Map<Long, Map<String, Object>> selectStudentByBirthRtMap2(Date date) {
        return dao.selectStudentByBirthRtMap2(date);
    }

    @Override
    public List<Map> selectStudentByBirthRtMap(Date date) {
        return dao.selectStudentByBirthRtMap(date);
    }

    @Override
    public List<Student> selectStudentByParams(Integer age, Double height, Character sex) {

        return dao.selectStudentByParams(age,height,sex);
    }

    @Override
    public List<Student> selectStudentByParams2(Integer age, Double height, Character sex) {
        return dao.selectStudentByParams2(age,height,sex);
    }

    @Override
    public Map selectStudentRtMap(Long id) {
        return dao.selectStudentRtMap(id);
    }

    @Override
    public void insertStudent(Map map) {
        dao.insertStudent(map);
    }
}
